import java.util.Scanner;
//求N的阶乘
public class fac {
    public  static int fac(int n){
        if(n<=1){
            return 1;
        }
        return n*fac(n-1);
    }

    public static void main(String[] args) {
        System.out.println("输入整数N");
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        System.out.println(n+"的阶乘为"+ fac(n));

    }

}